Hi,
I am trying to get all incident that relevant to specific service but looks like the API isn’t take only the service that i am writing to him.
This is the code in python:
def get_incidents_list():
url = “https://mycompany.pagerduty.com/api/v1/incidents”
headers = {
‘Authorization’: ‘Token token=Uw5pPF2zwfCy4DZWzgqv’
}
payload = {‘status’: ‘triggered,resolved’, ‘service’: ‘P0ITW5R’, ‘since’: SINCEDATE + ‘T’ + SINCETIME + ‘Z’}
res = requests.get(url, headers=headers, data=payload)
son_res = res.json()
print “"
print json.dumps(son_res)
print "”
I am getting all kind of incident that not belong to the service that i want.